package com.example.config;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;

public class AlipayConfig {
    /**
     * 支付宝网关地址
     */
    public static String serverUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";
    /**
     * appId
     */
    public static String appId = "9021000138676348";
    /**
     * 应用私钥 后期替换成自己的私钥
     */
    public static String privateKey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCO6fSVBpxndKeoIojRwtas5Nx5Oi/Sd+Qbn9qtzX26tbX7RXhDMWi4rGMwe+HUv39ZQjjmLztprYItULzqsf2rno6uzNmz5v0T0K+gh+TwTE/y/M4GFVkiGH8JFRefDvcWmszzQEEMi75cs5aBbPMIBkdOIru9vdd4rLVLBm8v3mJYnuEZkPs5nrMsHkD7oDaDV9ge5RSCSjS0w6L7ninKHODIbI1fueDQMqGIbR+PMDs6yk+G3oO68Vx5B4O/SJythGwW5i6oaXatfylsdKtNPhsdfYD+rDrE7wpxOkhJKQHwC2Y3eVI/+/Jaaa9vuq3Fzpp1+Oyf9Fob2VYjI24dAgMBAAECggEAKD3spwIDjIYmp4uB5z7r4CdZhbFCwgsMalLq6sHQQ4DjS2vWX2VMTaQNEhvwDU4W9/VTvE1Ud39qBoSTjaqs+WReXQ5Fxwil/qxmp9dcOeXjJVLWWJQuUxF+w/nyetFl9jGEwII5TuUSp1vSZ4NcM8hAz9mr79PDFrHbItMe/+U5+5tx/viCDsT9EQ/a/oyjvcDlSWQfG4FJ1zzhqv6G7xxur0tRESRiTTSdqdEXBk0GLyfEAR2o/5iJ3nEevoiC8FPbVW0Kbse+IBVkak0NUBPicYnljl40GHztLMPMcrvNqBpdufTB/MetwZ/68UlbDXKn59TGGWWCmSgtzYR0wQKBgQDzq1u+7mM88WHE3vjBIwpcxQYauh7WVhqniS4HQrMEYEzXj4rdZTbh3iYATvcp61Xl6lEXuCGy/xLPCB9ElKQGm0tIqzvhlCNDdrKzyuSazEousw8Az0NgWfXBDEKY3LFiP6tQxO33qBQPvQtAhRBH3TcSBvQBIlrlVGrOilQTqQKBgQCWJVlcyZDjcTroZBs0kbPr91p+IcBhvxaXH4+aVjpiyh+G/hczrRV+04uTyj/t0xLXqAI0fmTHq/NJAlS9WqbJDeJNYWT/M9FFgA0gGTuddWwUEiS2ZQP+ssNFw55p8ZUqm5ghX4hUm2DmZczLLYavnW+Iu2so8VPtmQgqksIPVQKBgHs3R6mA+oWyufHHnpprka3fo3qYa0ePOuNFJxVc0RGBcNoAKARUTjBhGW5GgA2eh00/88m+vqu4+FXgkY8oatk8ZhFVJW6objyLJUptarQsYcbDnO6X4EY0t2TrQjHyR3CbKZIqQvtc7ugWfD4gC1+LqXFgOrroGHam/Wt735AhAoGBAIrq649p/2Awd2xkkrdEx89fAJ8K41CM2H3ieZ82gLa+hAUGOrlZPzYkzFNlIVkNnbVigQfImb4UXfgC7Bx2LzJ+Yg9uOV/VtZ40J/C25+17ow++6bDILbYN95Yos/0ZxAW0CEF4fk6ppDIHpj+mU6NQas17el5bSmfe2ytotZwxAoGBAMfvPe61bGJdlCBJaubCl86ld/0lfdqvO6xumx4PSwc/eW68OZRa/UbjqwNDc17supZw2USe5/oEtmBA8ggS/UJWsTB4p6U7HteGr20mpfoqAmWQfpRFIMSyVh9Mid3REBELcCpfWuPRCY9hynzxhmFEN0A4dLRsOyu61Cj23Yki";
    /**
     * 发送数据的格式 目前只能为json
     */
    public static String format = "json";
    /**
     * 设置字符集编码 目前只能为utf-8
     */
    public static String charset = "utf-8";
    /**
     * 支付宝公钥 后期替换成自己的支付宝公钥
     */
    public static String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAleZ55JpV0Wdw8kgbphck5tCbkqcPVpo6044fDnrX3bogMaWkVLG1jhPn2O8naEk6eeQKyh0ySEVJrrMLAsy5GYIhch9SYE8UVvanrKTCkGS/pFixv82+eoTJdJvB9hIF8w/S9LXWDfd9gn5h/B3Rmqg6SRiA24AR/cL6Tsj47wNfi6llrW7lcz/hzkSM0UM8X36HP7seql+PqqDwEB3ducnQOp/boYKGsNjJs5tNQ+uc5JVxrVg1pyH1WrFwBFHHwog0oh2qXeWEIytZtjMEkoptsPBF7Kjr9reIpNCypAY1B4pZe9MQJY1eznbzNDGO+rIMmqtXVaIM+PlG3QquZwIDAQAB";
    /**
     * 支付宝签名 目前是 RSA2
     */
    public static String signType = "RSA2";
    public static AlipayClient getAlipayClient() {
        // 获得初始化的AlipayClient
        return new DefaultAlipayClient(AlipayConfig.serverUrl, AlipayConfig.appId,
                AlipayConfig.privateKey, AlipayConfig.format, AlipayConfig.charset, AlipayConfig.publicKey,
                AlipayConfig.signType);
    }
}